package com.yimeng.multiplemodules.demoadmin.controller;

import com.yimeng.multiplemodules.democommon.api.GetDate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author yimeng
 * @Date 2024/8/21 21:46
 * @PackageName:com.yimeng.multiplemodules.demoadmin.controller
 * @ClassName: TransferGetDate
 * @Description: TODO
 * @Version 1.0
 */
@RestController
@RequestMapping("/test")
public class TransferGetDate {
    /**
     * 测试调用demo-common中的获取时间函数是否生效
     */
    @GetMapping("/date")
    public String getDate(){
        Date d = GetDate.getDate();
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return "当前时间："+df.format(d);
    }
}
